<template>
	<view class="container">
		所有社团信息
		<uni-section title="全部社团" type="line">
			<uni-list v-for="elem in array" :key="elem.clubId">
				<!-- <uni-list-item :title="clubName" :note="clubInfo">
				</uni-list-item> -->
				<uni-card>
					<view @click="clubDetail(elem.clubId)">{{elem.clubName}}</view>
					<image :src="elem.clubPicture" style="width: 95%;height: 200px;"></image>
					<text>{{elem.clubInfo}}</text>
				</uni-card>
			</uni-list>
		</uni-section>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				array:[
					
				]
			}
		},
		
		onShow() {
			var _this=this
			uni.request({
				url:'http://localhost:9000/club/selectAllClub',
				dataType:'json',
				success(res) {
					_this.array=res.data
				}
			})
		},
		
		methods: {
			clubDetail(option){
				console.log(option)
				uni.navigateTo({
					url:"../club_detail/club_detail?clubId="+option
					
				})
			}
		}
	}
</script>

<style>

</style>
